package model

import (
	"gorm.io/gorm"
	"time"
)

type Videos struct {
	Id                uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Title             string         `gorm:"column:title;type:varchar(20);not null;" json:"title"`
	Author            string         `gorm:"column:author;type:varchar(20);not null;" json:"author"`
	Times             string         `gorm:"column:times;type:varchar(50);not null;" json:"times"`
	Likes             int            `gorm:"column:likes;type:bigint(10);not null;" json:"likes"`
	Types             string         `gorm:"column:types;type:enum('科技', '生活', '国家', '娱乐');not null;" json:"types"`
	Img               string         `gorm:"column:img;type:varchar(255);not null;" json:"img"`
	UploadMethod      string         `gorm:"column:upload_method;type:enum('URL获取', '本地上传');not null;" json:"upload_method"`
	MemoryAddress     string         `gorm:"column:memory_address;type:enum('视频云服务1', '视频云服务2', '视频云服务3');not null;" json:"memory_address"`
	TranscodingScheme string         `gorm:"column:transcoding_scheme;type:enum('流高4超', '不转码');not null;" json:"transcoding_scheme"`
	CreatedAt         time.Time      `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;" json:"created_at"`
	UpdatedAt         time.Time      `gorm:"column:updated_at;type:datetime;not null;default:CURRENT_TIMESTAMP;" json:"updated_at"`
	DeletedAt         gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;default:NULL;" json:"deleted_at"`
}

type Users1 struct {
	Id        uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Img       string         `gorm:"column:img;type:varchar(255);not null;" json:"img"`
	VideoId   uint           `gorm:"column:video_id;type:bigint(20) UNSIGNED;not null;" json:"video_id"`
	Phone     string         `gorm:"column:phone;type:varchar(11);not null;" json:"phone"`
	Name      string         `gorm:"column:name;type:varchar(32);not null;" json:"name"`
	Text      string         `gorm:"column:text;type:varchar(50);not null;" json:"text"`
	Address   string         `gorm:"column:address;type:varchar(50);not null;" json:"address"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
